package com.liujit.bms.admin.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liujit.bms.admin.domain.model.BlogMemberCollection;
import com.liujit.bms.admin.domain.query.BlogArticleCollectionQuery;
import com.liujit.bms.admin.domain.result.BlogArticleCollectionResult;
import com.liujit.bms.admin.mapper.BlogArticleCollectionMapper;
import com.liujit.bms.admin.service.BlogArticleCollectionService;
import com.liujit.common.domain.result.PageBean;
import com.liujit.common.utils.Pagination;
import org.springframework.stereotype.Service;

/**
 * @Description 博客会员收藏Service实现类
 * @Author liujun
 * @Date 2021-07-19 17:26:26
 */
@Service
public class BlogArticleCollectionServiceImpl extends ServiceImpl<BlogArticleCollectionMapper, BlogMemberCollection> implements
        BlogArticleCollectionService {

    @Override
    public PageBean<BlogArticleCollectionResult> getPage(BlogArticleCollectionQuery query) {
        Page<BlogArticleCollectionResult> page = Pagination.page(query);
        IPage<BlogArticleCollectionResult> iPage = super.baseMapper.selPage(page, query);
        return PageBean.page(iPage);
    }
}
